Carbon


KCAddCallback

Header: Keychain.h Carbon status: Under Evaluation

Registers your Keychain event-handling callback function.

OSStatus KCAddCallback (
    KCCallbackUPP callbackProc, 
    KCEventMask eventMask, 
    void *userContext
);
callbackProc

A universal procedure pointer (UPP) to your Keychain event-handling callback function. To create a UPP to your callback function, call the function NewKCCallbackUPP.

eventMask

A bit mask indicating the Keychain-related events to be received by your callback function. See “Keychain Event Mask Constants” for a description of this mask.

userContext

A pointer to caller-defined storage. This value will be passed to your callback function. Your callback function might use it to track which instance of a function is active.

function result

A result code. The result code errKCDuplicateCallback indicates that the callback function is already registered.

DISCUSSION

The Keychain Manager invokes the specified callback function whenever a keychain event occurs, or when a lengthy operation is occurring, as indicated by the event mask. In turn, the Keychain Manager passes the event type, an information structure about the event, and a reference to the application-defined context to your callback function.

VERSION NOTES

Available beginning with Keychain 1.0.

AVAILABILITY

Under evaluation for Carbon. Available in CarbonLib 1.0 and later when KeychainLib 1.0 or later is installed. Exported by CarbonLib 1.0 and later and by KeychainLib 1.0 and later.


© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)